// 放 请求函数的 一些东西
import request from '@utils/request'

// 获取 分类 的接口
const getCates = (params = {}) => request.get('/shop/goods/category/all', { params })

// 获取 banner 的接口
const getHomeBanners = () => request.get('/banner/list')

// 获取 猜你喜欢 列表
const getRecommends = () => request.post('/shop/goods/list', ({
  categoryId: 173191
}))

// 获取商品详情
const fetchItmDetail = (id) => request.get('/shop/goods/detail?id=' + id)

// 获取 商品 列表
const getItemLists = (params) => request.post('/shop/goods/list',  params )
export {
  getCates,
  getHomeBanners,
  getRecommends,
  fetchItmDetail,
  getItemLists
}
